package com.power.dao;

import com.power.pojo.Users;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 朱雄
 * Date: 2020/10/03 8:20
 * Description:登录
 * Version: V1.0
 */
public interface LoginDao {
    /**
     * 登录
     * @param users
     * @return
     */
    List<Map<String,Object>> login(Users users) throws SQLException;

    /**
     * 判断用户是否冻结
     * @param users
     * @return
     */
    List<Map<String,Object>> loginByStat(Users users) throws SQLException;

    /**
     * 判断用户是否存在
     * @param users
     * @return
     */
    List<Map<String, Object>> loginByIsDelete(Users users) throws SQLException;

    /**
     * 修改登入时间
     * @param user_account
     * @param date
     */
    void updateLatly(String user_account, Date date) throws SQLException;

    /**
     * 判断用户角色是否可用
     * @param users
     * @return
     */
    List<Map<String, Object>> findByRole(Users users) throws SQLException;

    /**
     * 当登录成功后查询所有信息
     * @param users
     * @return
     */
    List<Map<String, Object>> loginByAll(Users users) throws SQLException;
}
